var findLabel = new Request({
	url: 'library/ajax/findLabel.php',
	method: 'post',
	onSuccess: function(response) {
		// Recycle
		if( response.indexOf("Recycle") == -1 ){
			$('jml_biji_terima').set('value', response);
			$('jml_biji_recycle').set('value', '0');
			$('jml_biji_seleksi').set('value', '0');
		}
		else{
			$('jml_biji_terima').set('value', '0');
			$('jml_biji_discard').set('value', '0');
			$('jml_biji_seleksi').set('value', '0');
			$('jml_biji_recycle').set('value', response.substr(7));
		}
	},

	onRequest: function() {
		$('jml_biji_terima').set('value', 'Mohon tunggu..');
	}
});	

var lossTandan = new Request.HTML({
	url: 'library/ajax/lossTandan.php',
	method: 'post',
	onSuccess: function(responseText, responseXML) {	
		$('loss_tandan_result').set('text','');
		$('loss_tandan_result').adopt(responseText);
	},

	onRequest: function() {
		$('loss_tandan_result').set('text', 'Mohon tunggu');
	}
});	


